package com.zretc.entity;

import org.springframework.stereotype.Component;

@Component
public class Relation {
    //影院与影片关系id
    private String relationId;
    // 关联的影院id
    private String cinemaId;
    // 关联的电影id
    private String movieId;
    //影院id
    private Cinema cinema;
    //影片id
    private Movie movie;

    public Relation() {
    }

    public Relation(String relationId, Cinema cinema, Movie movie) {
        this.relationId = relationId;
        this.cinema = cinema;
        this.movie = movie;
    }

    public Relation(String relationId, String cinemaId, String movieId, Cinema cinema, Movie movie) {
        this.relationId = relationId;
        this.cinemaId = cinemaId;
        this.movieId = movieId;
        this.cinema = cinema;
        this.movie = movie;
    }

    public String getRelationId() {
        return relationId;
    }

    public void setRelationId(String relationId) {
        this.relationId = relationId;
    }

    public Cinema getCinema() {
        return cinema;
    }

    public void setCinema(Cinema cinema) {
        this.cinema = cinema;
    }

    public Movie getMovie() {
        return movie;
    }

    public void setMovie(Movie movie) {
        this.movie = movie;
    }

    public String getCinemaId() {
        return cinemaId;
    }

    public void setCinemaId(String cinemaId) {
        this.cinemaId = cinemaId;
    }

    public String getMovieId() {
        return movieId;
    }

    public void setMovieId(String movieId) {
        this.movieId = movieId;
    }

    @Override
    public String toString() {
        return "Relation{" +
                "relationId='" + relationId + '\'' +
                ", cinemaId='" + cinemaId + '\'' +
                ", movieId='" + movieId + '\'' +
                ", cinema=" + cinema +
                ", movie=" + movie +
                '}';
    }

}
